package com.lyz.dataStructure.algorithm.VIPKID2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 17:00
 * @Description:
 **/

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/3 17:00
 *@Description:
 **/
public class 寻找zero数组 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s =sc.nextLine();
        String[] st =s.replace(" ","").split(",");
        int[]  arr = new int[st.length];
        for(int i =0;i<arr.length;i++){
            arr[i] =Integer.parseInt(st[i]);
        }
        System.out.println(returnNum(arr));

    }

    public static  int returnNum(int[] arr){
        Map<Integer,Integer> map = new HashMap<>();
        int count =0;
        for(int i =0;i<arr.length;i++){
            map.put(i,arr[i]);
        }
        for(int i =0;i<arr.length;i++){
            int two = 0-arr[i];
            if(map.containsKey(two)&& map.get(two) != i){
                count ++;
            }
        }
        return  count;
    }
}
